#!/bin/bash
# Script to instantiate chaincode

declare -a allpeernodes=({{ allpeers|map(attribute='fullname')|list|join(' ') }})
for anode in ${allpeernodes[@]}; do
  ss=$(wget -O- -S ${anode}:7061/healthz | jq '.status')
  printf "%20s %s\n" $anode $ss
done

declare -a allorderernodes=({{ allorderers|map(attribute='fullname')|list|join(' ') }})
for anode in ${allorderernodes[@]}; do
  ss=$(wget -O- -S ${anode}:7060/healthz | jq '.status')
  printf "%20s %s\n" $anode $ss
done
